target = mutex.bin lock_guard.bin unique_lock.bin scoped_lock.bin yield.bin thread.bin jthread.bin \
	stop_token stop_source.bin

all : $(target)

mutex : mutex.cpp
	clang++ -std=c++11 -o mutex mutex.cpp

lock_guard : lock_guard.cpp
	clang++ -std=c++11 -o lock_guard lock_guard.cpp

unique_lock : unique_lock.cpp
	clang++ -std=c++17 -o unique_lock unique_lock.cpp

scoped_lock : scoped_lock.cpp
	clang++ -std=c++17 -o scoped_lock scoped_lock.cpp

yield : yield.cpp
	clang++ -std=c++11 -o yield yield.cpp

thread : thread.cpp
	clang++ -std=c++11 -o thread thread.cpp

jthread : jthread.cpp
	clang++ -std=c++20 -o jthread jthread.cpp

jthread2 : jthread2.cpp
	clang++ -std=c++20 -o jthread2 jthread2.cpp

stop_token : stop_token.cpp
	clang++ -std=c++20 -o stop_token stop_token.cpp

stop_source : stop_source.cpp
	clang++ -std=c++20 -o stop_source stop_source.cpp

clean : 
	rm -f $(target)

